package com.ghck.shop.dao.provider;

import java.util.Map;

import com.ghck.shop.model.TiXian;

public class TiXianMapperProvider {

	public String adminTixianlist(Map<String, Object> map){
		StringBuffer sb = new StringBuffer();
		TiXian tiXian = (TiXian) map.get("tixian");
		sb.append("select * from t_tixian where 1=1 ");
		if(tiXian.getStatus() != null){
			sb.append(" and status=#{tixian.status}");
		}
		sb.append(" order by update_time desc limit #{start},#{limit}");
		return sb.toString();
	}
	
	public String countAdminTixianlist(TiXian tiXian){
		StringBuffer sb = new StringBuffer();
		sb.append("select count(*) from t_tixian where 1=1 ");
		if(tiXian.getStatus() != null){
			sb.append(" and status=#{status}");
		}
		return sb.toString();
	}
}
